<?php

namespace app\common\model;


class Reply extends BaseModel {
    public function getCreateTimeAttr($value) {
        return date('m月d h:i', $value);
    }

    public function userInfo() {
        return $this->hasOne('User', 'id', 'user_id')->field('id,nickName,avatarUrl');
    }

    public function sendInfo() {
        return $this->hasOne('User', 'id', 'send_id')->field('id,nickName');
    }
}